<?
	session_start();
	require("connect.php");
?>
<html><!-- InstanceBegin template="/Templates/trangmau1.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="Javascript" src="scripts/innovaeditor.js"></script>
<link rel="stylesheet" type="text/css" href="css/engine.css" />
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<script type="text/javascript" src="stmenu.js"></script></head>

<body>
<table width="990px" align="center">
<tr><td colspan="3" height="145" align="center" valign="top">
<object classid="clsidsmilie27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="990" height="150" align="absmiddle">
   <param name="movie" value="flash/THPT.swf" />
   <param name="quality" value="high" />
   <embed src="flash/THPT.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="990" height="150" align="absmiddle"></embed>
 	</object>
</td></tr>
<tr><td colspan="3" height="32px" class="mainmenu" valign="middle">&nbsp;&nbsp;
	<a href="index.php">Trang chủ</a> &nbsp;&nbsp;
	<a href="tainguyen.php">Tài nguyên</a> &nbsp; &nbsp;	
	<a href="trangcaclop.php">Trang các lớp</a>&nbsp;&nbsp;		
	<a href="thuvienanh.php">Thư viện ảnh</a>&nbsp;&nbsp;
	<a href="khoahoc.php">Các khóa học</a>&nbsp;&nbsp;
	<a href="vanban.php">Văn bản</a>&nbsp;&nbsp;
	<a href="lienhe.php">Liên hệ</a>&nbsp;&nbsp;
	<?
		if ($_SESSION["login"]!=true){
	?>
	<a href="login.php">Đăng nhập</a>
	<? }else{?>
	<a href="logout.php">Thoát</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	
	&nbsp;&nbsp;
	<?
		$nguoidung=$_SESSION["username"];
		if($_SESSION["quyen"]==0){
		$resu23=mysql_query("select * from admin where maadmin='{$nguoidung}'");
		$row23=mysql_fetch_array($resu23);
		?>
			<font color="#FFFFFF">			 
			<? echo "Xin chào : ".$row23["hotendem"]."&nbsp;".$row23["ten"]; ?>
			</font>
		<? }else if($_SESSION["quyen"]==1){
			$resu23=mysql_query("select * from giaovien where magv='{$nguoidung}'");
			$row23=mysql_fetch_array($resu23);
		?>
			<font color="#FFFFFF">			 
			<? echo "Xin chào : ".$row23["hotendem"]."&nbsp;".$row23["ten"]; ?>
			</font>
		<? }else if($_SESSION["quyen"]==2){
			$resu23=mysql_query("select * from phuhuynh where maph='{$nguoidung}'");
			$row23=mysql_fetch_array($resu23);
		?>
			<font color="#FFFFFF">			 
			<? echo "Xin chào : ".$row23["tenph"]; ?>
			</font>
		<? }else if(($_SESSION["quyen"]==3)||($_SESSION["quyen"]==4)){
				$resu23=mysql_query("select * from hocsinh where mahs='{$nguoidung}'");
				$row23=mysql_fetch_array($resu23);
		?>
			<font color="#FFFFFF">			 
			<? echo "Xin chào : ".$row23["hotendem"]."&nbsp;".$row23["ten"]; ?>
			</font>
		<? }
	}?>
</td></tr>
<tr>
	<td width="240px" valign="top" align="left" height="800" class="lcol_bkgr">
	<table width="240" border="0" cellpadding="0" cellspacing="0" class="lcol_bkgr2" dwcopytype="CopyTableRow">
                <tr>
                  <td width="25" align="left" valign="top"><img src="anh/spacer.gif" width="25" height="1" /></td>
                  <td width="205" align="left" valign="top">
                    <table width="205" border="0" cellspacing="0" cellpadding="0">
                      
              		<tr>
                        <td align="left" valign="top"><img src="anh/spacer.gif" width="1" height="6" /></td>
                     </tr>
              <tr> 
                <td align="left" class="bl_title_bkgr"><a href="tintuc.php"><font color="#FFFFFF">Tin tức & sự kiện</font></a></td>
                      	</tr>
                      	<tr>
                        <td align="left" valign="top"><img src="anh/dlet_bl_1.gif" width="205" height="12" /></td>
                      	</tr>
                      	<tr>
                        <td align="left" valign="top" class="block_02">
							<table width="205" border="0" cellspacing="0" cellpadding="0">
                            	<tr>
                              	<td width="20" align="left" valign="top"><img src="anh/spacer.gif" width="20" height="1" /></td>
                              	<td width="175" align="left" valign="top" class="copy">

                              <div id="menu_control">
							  <?
							  	$resul=mysql_query("select * from loaitin order by tenlt") or die("Error !");
								while($row=mysql_fetch_array($resul))
								{
								?>
								<a href="loaitin_detail.php?malt=<? echo $row[0];?>"><img src="anh/1px.gif" width="15" height="16"><? echo $row[1];?></a>
								<?
								}
							  ?>							    																								
								</div>

								<div style="text-align:right;font-size:9px;"></div></td>
                              	<td width="20" align="left" valign="top"><img src="anh/spacer.gif" width="20" height="1" /></td>
                            </tr>
                          </table>
						 </td>
                      </tr>
                      <tr>
                        <td align="left" valign="top"><img src="anh/dlet_bl_3.gif" width="205" height="12" /></td>
                      </tr>                     
                    </table>
					
	<!--het menu 1-->					                  																						
	<!--cac menu tiep theo-->	
	 		<table width="205" border="0" cellspacing="0" cellpadding="0">
                      
              		<tr>
                        <td align="left" valign="top"><img src="anh/spacer.gif" width="1" height="6" /></td>
                     </tr>	
              		<tr> 
                	<td align="left" class="bl_title_bkgr"><font color="#FFFFFF">Các tổ bộ môn</font></td>
                      	</tr>
                      	<tr>
                        <td align="left" valign="top"><img src="anh/dlet_bl_1.gif" width="205" height="12" /></td>
                      	</tr>
                      	<tr>
                        <td align="left" valign="top" class="block_02">
							<table width="205" border="0" cellspacing="0" cellpadding="0">
                            	<tr>
                              	<td width="20" align="left" valign="top"><img src="anh/spacer.gif" width="20" height="1" /></td>
                              	<td width="175" align="left" valign="top" class="copy">

                              <div id="menu_control">
							  <?
							  	$resu2=mysql_query("select * from tobomon order by tentbm") or die("Error !");
								while($row2=mysql_fetch_array($resu2))
								{
								?>
								<a href="tobomon.php?matbm=<? echo $row2[0];?>"><img src="anh/1px.gif" width="15" height="16"><? echo $row2[1];?></a>
								<?
								}
							  ?>							    																								
								</div>

								<div style="text-align:right;font-size:9px;"></div></td>
                              	<td width="20" align="left" valign="top"><img src="anh/spacer.gif" width="20" height="1" /></td>
                            </tr>
                          </table>
						 </td>
                      </tr>
                      <tr>
                        <td align="left" valign="top"><img src="anh/dlet_bl_3.gif" width="205" height="12" /></td>
                      </tr>                     
                    </table>
	<?
		//het to giao vien
	?>
	<?
		if ($_SESSION["login"]==true){
	?>
		<table width="205" border="0" cellspacing="0" cellpadding="0">
                      
              		<tr>
                        <td align="left" valign="top"><img src="anh/spacer.gif" width="1" height="6" /></td>
                     </tr>	
              		<tr> 
                	<td align="left" class="bl_title_bkgr">Quản trị</td>
                      	</tr>
                      	<tr>
                        <td align="left" valign="top"><img src="anh/dlet_bl_1.gif" width="205" height="12" /></td>
                      	</tr>
                      	<tr>
                        <td align="left" valign="top" class="block_02">
							<table width="205" border="0" cellspacing="0" cellpadding="0">
                            	<tr>
                              	<td width="20" align="left" valign="top"><img src="anh/spacer.gif" width="20" height="1" /></td>
                              	<td width="175" align="left" valign="top" class="copy">

                              <div id="menu_control">
							  <?
							 	if ($_SESSION["quyen"]==0){
							  ?>
							  	<a href="admin/index.php"><img src="anh/1px.gif" width="15" height="16">Trang admin</a>
							  <? }?>
							  <?
							 	if ($_SESSION["quyen"]==1){
							  ?>
							  	<a href="giaovien.php?magv=<? echo $_SESSION["username"];?>"><img src="anh/1px.gif" width="15" height="16">Trang giáo viên</a>							  	
							  <? }?>
							  <?
							 	if ($_SESSION["quyen"]==2){
								$maph=$_SESSION["username"];
								$resu3=mysql_query("select * from phuhuynh where maph='{$maph}'");
								$row3=mysql_fetch_array($resu3);
								$resu4=mysql_query("select * from hocsinh where mahs='{$row3["mahs"]}'");
								$row4=mysql_fetch_array($resu4);
							  ?>
							  	<a href="trangphuhuynh.php?maph=<? echo $maph;?>"><img src="anh/1px.gif" width="15" height="16">Thông tin cá nhân</a>
								<a href="solienlac.php?mahs=<? echo $row3["mahs"];?>&mal=<? echo $row4["mal"];?>"><img src="anh/1px.gif" width="15" height="16">Sổ liên lạc</a>
							  <? }?>
							   <?
							 	if (($_SESSION["quyen"]==3)||($_SESSION["quyen"]==4)){
								$resu5=mysql_query("select * from hocsinh where mahs='{$_SESSION["username"]}'");
								$row5=mysql_fetch_array($resu5);
							  ?>
							  	<a href="tranghocsinh.php?mahs=<? echo $_SESSION["username"];?>&mal=<? echo $row5["mal"];?>"><img src="anh/1px.gif" width="15" height="16">Trang cá nhân</a>
								
							  <? }?>				    																								
								</div>

								<div style="text-align:right;font-size:9px;"></div></td>
                              	<td width="20" align="left" valign="top"><img src="anh/spacer.gif" width="20" height="1" /></td>
                            </tr>
                          </table>
						 </td>
                      </tr>
                      <tr>
                        <td align="left" valign="top"><img src="anh/dlet_bl_3.gif" width="205" height="12" /></td>
                      </tr>                     
                    </table>
	<? }?>
	<?
		//het cong cu
	?>
	<!--begin lien ket-->
	<table width="205" border="0" cellspacing="0" cellpadding="0">
                      
              		<tr>
                        <td align="left" valign="top"><img src="anh/spacer.gif" width="1" height="6" /></td>
                     </tr>	
              		<tr> 
                	<td align="left" class="bl_title_bkgr"><font color="#FFFFFF">Liên kết</font></td>
                      	</tr>
                      	<tr>
                        <td align="left" valign="top"><img src="anh/dlet_bl_1.gif" width="205" height="12" /></td>
                      	</tr>
                      	<tr>
                        <td align="left" valign="top" class="block_02">
							<table width="205" border="0" cellspacing="0" cellpadding="0">
                            	<tr>
                              	<td width="20" align="left" valign="top"><img src="anh/spacer.gif" width="20" height="1" /></td>
                              	<td width="175" align="center" valign="top" class="copy">
                              		<!--<div id="menu_control">-->
									<?
										$resu5=mysql_query("select * from lienket where trangthai='1'");
										while($row5=mysql_fetch_array($resu5)){
									?>
										<a href="<? echo $row5["duongdan"];?>" title="<? echo $row5["tenlk"];?>">
											<img src="thumb.php?h=160&w=158&url=anhlienket/<? echo $row5["anh"];?>" border="0"/>
										</a>
										<div class="noidungnhanxet"></div>
							  		<?
									}?>    																								
									<!--</div>-->
									<div style="text-align:right;font-size:9px;"></div></td>
                              	<td width="20" align="left" valign="top"><img src="anh/spacer.gif" width="20" height="1" /></td>
                            </tr>
                          </table>
						 </td>
                      </tr>
                      <tr>
                        <td align="left" valign="top"><img src="anh/dlet_bl_3.gif" width="205" height="12" /></td>
                      </tr>                     
                    </table>
	<!--end lien ket-->
					</td>
                  <td width="10" align="left" valign="top"><img src="anh/spacer.gif" width="10" height="1" /></td>
                </tr>
              </table>
			  
			  
	</td>
	<td valign="top"><!-- InstanceBeginEditable name="EditRegion3" -->
	<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
			<!--begin-->				
                <tr>
                  <td width="10" align="left" valign="top"><img src="anh/dlet_artblock_11.gif" width="10" height="8" /></td>
                  <td align="left" valign="top" class="a_block_12"><img src="anh/spacer.gif" width="1" height="8" /></td>
                  <td width="10" align="right" valign="top"><img src="anh/dlet_artblock_13.gif" width="10" height="8" /></td>
                </tr>

                <tr>
                  <td width="10" align="left" valign="top"><img src="anh/dlet_artblock_21.gif" width="10" height="23" /></td>
                  <td align="left" valign="top" class="a_block_22"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="17" align="left" valign="top"><img src="anh/dlet_artblock_22_01.gif" width="17" height="23" /></td>
                        <td align="left"><span class="category"><strong><a href="http://www.thuvientinhoc.vn/index.php?do=cat&amp;category=vector">Thu+ vie^.n Vector</a></strong></span> <span class="ntitle">: SS Halloween banners</span> </td>
                        <td width="17" align="right" valign="top"><img src="anh/dlet_artblock_22_03.gif" width="17" height="23" /></td>

                      </tr>
                    </table></td>
                  <td width="10" align="right" valign="top"><img src="anh/dlet_artblock_23.gif" width="10" height="23" /></td>
                </tr>
                <tr>
                  <td width="10" align="left" valign="top"><img src="anh/dlet_artblock_31.gif" width="10" height="9" /></td>
                  <td align="left" valign="top" class="a_block_32"><img src="anh/spacer.gif" width="1" height="9" /></td>
                  <td width="10" align="right" valign="top"><img src="anh/dlet_artblock_33.gif" width="10" height="9" /></td>
                </tr>

                <tr>
                  <td width="10" align="left" valign="top"><img src="anh/dlet_artblock_41.gif" width="10" height="20" /></td>
                  <td align="left" valign="top" class="a_block_42"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="20" align="left" class="slink">  Người đăng: <strong><a onclick="return dropdownmenu(this, event, UserNewsMenu('href=&quot;http://www.thuvientinhoc.vn/index.php?subaction=userinfo&amp;amp;user=admin&quot;', 'href=&quot;http://www.thuvientinhoc.vn/index.php?subaction=allnews&amp;amp;user=admin&quot;','admin', '5'), '170px')" onmouseout="delayhidemenu()" href="http://www.thuvientinhoc.vn/index.php?subaction=userinfo&amp;user=admin">admin</a></strong>Thời gian</td>
                      </tr>

                    </table></td>
                  <td width="10" align="right" valign="top"><img src="anh/dlet_artblock_43.gif" width="10" height="20" /></td>
                </tr>
                <tr>
                  <td width="10" align="left" valign="top"><img src="anh/dlet_artblock_51.gif" width="10" height="8" /></td>
                  <td align="left" valign="top" class="a_block_52"><img src="anh/spacer.gif" width="1" height="8" /></td>
                  <td width="10" align="right" valign="top"><img src="anh/dlet_artblock_53.gif" width="10" height="8" /></td>
                </tr>
                <tr>

                  <td width="10" align="left" valign="top" class="a_block_61">&nbsp;</td>
                  <td align="left" valign="top" class="news" bgcolor="#FFFFFF">
				  <?
				  //<div id='news-id-6238'>
				  	//<div style="text-align: center;">
				  		//<span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'times new roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
						//<span class="Apple-style-span" style="color: #666666; font-family: Arial; font-size: 11px; line-height: 16px;">
							//<img src="http://img269.imageshack.us/img269/5629/7juq1kxjkq.jpg" onclick="return hs.expand(this, { src: 'http://img269.imageshack.us/img269/5629/7juq1kxjkq.jpg' });" onmouseover="this.style.cursor='pointer';">
							//</span></span><br />
						//<span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'times new roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
							//<span class="Apple-style-span" style="color: #666666; font-family: Arial; font-size: 11px; line-height: 16px;">5 EPS | 5.12mb(rar)
							//</span>
						//</span>
						//</div>
						//</div>
						echo "Vung lam viec !";
				?>
				</td>
                  <td width="10" align="right" valign="top" class="a_block_63">&nbsp;</td>
                </tr>
                <tr>
                  <td width="10" align="left" valign="top"><img src="anh/dlet_artblock_71.gif" width="10" height="7" /></td>
                  <td align="left" valign="top" class="a_block_72"><img src="anh/spacer.gif" width="1" height="7" /></td>
                  <td width="10" align="right" valign="top"><img src="anh/dlet_artblock_73.gif" width="10" height="7" /></td>

                </tr>
                <tr>
                  <td width="10" height="26" align="left" valign="top" class="a_block_61">&nbsp;</td>
                  <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="100" height="26" align="left" class="slink" bgcolor="#FFFFFF">
						//cac tin khac
						</td>
                        <td height="26" align="right" class="stext" bgcolor="#FFFFFF"><a href="http://www.thuvientinhoc.vn/index.php?newsid=6238#comment"><img src="anh/dlet_artblock_point_1.gif" width="13" height="9" border="0" />Lời bình (2)</a> &nbsp;<a href="http://www.thuvientinhoc.vn/index.php?newsid=6238"><img src="anh/dlet_artblock_point_1.gif" width="13" height="9" border="0" /><strong>Chi tiết</strong></a></td>
                      </tr>
                    </table></td>
                  <td width="10" height="26" align="right" valign="top" class="a_block_63">&nbsp;</td>
                </tr>
                <tr>
                  <td width="10" align="left" valign="top"><img src="anh/dlet_artblock_81.gif" width="10" height="14" /></td>

                  <td align="left" valign="top" class="a_block_82">&nbsp;</td>
                  <td width="10" align="right" valign="top"><img src="anh/dlet_artblock_83.gif" width="10" height="14" /></td>
                </tr>
				<!--End-->
              </table>
	<!-- InstanceEndEditable --></td>
	<!--Begin menu phai-->
	<td width="170px" valign="top" align="center">		
		<div class="panelphai">
			<div class="panelphai_header"><font color="#FFFFFF" size="-1">TIN MỚI NHẤT</font></div>
			<table align="center" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF" width="100%">
			<TR><TD class="copy" align="left" valign="top">
			<?
				$resu22=mysql_query("select * from tintuc where trangthai='1' order by ngay DESC limit 0,5");
				while($r22=mysql_fetch_array($resu22)){?>				
						<div id="menu_control">
								<a href="tintuc_detail.php?matt=<? echo $r22["matt"];?>">
								<img src="anh/1px.gif" height="15" width="16" border="0">
										<?										
										//$string=$r22["tieude"];
										//echo substr($string,0,30);
										//if(strlen($string)>=31){
										//echo "...";
										echo $r22["tieude"];						
										//}				
									?>																	
								</a>
							
						</div>
			<? }?>
			</TD></TR>			
			</table>
		</div>
		<!--anh chay-->
		<div class="panelphai">
			<div class="panelphai_header"><font color="#FFFFFF" size="-1">ALBUM ẢNH</font></div>               
			<marquee height="300" width="100%" onmouseout="this.start()" onmouseover="this.stop()" scrolldelay="2" scrollamount="2" direction="up" behavior="scroll">
				<table align="center" width="99%" cellpadding="2" cellspacing="0" border="0" bgcolor="#FFFFFF">					
					<?
					$resu23=mysql_query("select * from thuvienanhtruong where trangthai=1");
					while($row23=mysql_fetch_array($resu23)){
					?>
						<tr><td>
							<a href='chitietthuvienanh.php?maalbum=<? echo $row23["maalbum"];?>'>
								<img src="thumb.php?h=155&w=160&url=thuvienanhtruong/<? echo $row23["duongdan"];?>" border="0"/>							
							</a>
						</td>
						</tr>
					<? }?>     					
				</table>
			</marquee>			    
         </div>		
	</td>
	<!--End menu phai-->
</tr>

<tr>
<td colspan="3">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="footer_b">
      <tr>
		<td width="42" align="left" valign="top"><img src="anh/dlet_footer_01.gif" width="42" height="71" /></td>
		<td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="left">&nbsp;</td>
                </tr>
                <tr>
                  <td height="24" align="left" class="stext"><a href="index.php">Trang chủ</a> | <a href="tintuc.php?subaction=newposts">Tin tức & Sự kiện</a> |</td>

                </tr>
                <tr>
                  <td align="left" class="stext">Phạm Ðức Ðóa<br /></td>
                </tr>
              </table></td>
			  <td></td>
		</tr>
	</table>
</td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
